var e = require;
var t = module;
var o = exports;
Object.defineProperty(o, "__esModule", {value: !0});
var n = e("LoadRes"),
    a = e("sdkConfig"),
    i = (function () {
        function e() {
            (this.SW_SystemBanner = !1),
                (this.SW_SystemInters = !1),
                (this.SW_Video = !1),
                (this.SW_Native = !1),
                (this.SW_NativeBanner = !1),
                (this.SW_NativeInters = !1),
                (this.SW_Box = !1),
                (this.SW_Block = !1),
                (this.SW_BigNative = !1),
                (this.SW_IconNative = !1),
                (this.ID_SystemBanner = ""),
                (this.ID_SystemInters = ""),
                (this.ID_Native = ""),
                (this.ID_NativeCustom = ""),
                (this.ID_Video = ""),
                (this.ID_Box = ""),
                (this.ID_Block = ""),
                (this.NUM_NativeIntersP = 0),
                (this.NUM_NativeIntersReport = 1),
                (this.NUM_BannerErrP = 0),
                (this.NUM_BannerErrMost = 0),
                (this.NUM_BannerErrMust = 0),
                (this.NUM_VideoErrP = 0),
                (this.NUM_VideoErrMost = 0),
                (this.NUM_VideoErrMust = 0),
                (this.NUM_BannerUpdateTime = 30),
                (this.SW_SystemBannerFirst = !0),
                (this.NUM_BannerMostShow = 999),
                (this.SW_IntersBaseControl = !1),
                (this.NUM_IntersStart = 0),
                (this.NUM_IntersIntervalNum = 0),
                (this.NUM_IntersIntervalTime = 0),
                (this.NUM_IntersDelayTime = 0),
                (this.NUM_IntersDelayP = 0),
                (this.NUM_NativeUpdateTime = 30),
                (this.SW_AddDesktop = !1),
                (this.SW_IntersIntervalToAddDesktop = !1),
                (this.NUM_AutoAddDeskMostTimes = 0),
                (this.NUM_IntersToAddDesktopNumber = 0),
                (this.SW_Statistics = !0),
                (this.SW_NavigateIcon = !1),
                (this.SW_NavigateGroup = !1),
                (this.SW_NavigateSettle = !1),
                (this.pushGameList = []),
                (this.bannerAd = null),
                (this.loadSucc_Banner = !1),
                (this.loadSucc_SystemBanner = !1),
                (this.loadSucc_NativeBanner = !1),
                (this.hasShowBanner = !1),
                (this.isShow_SystemBanner = !1),
                (this.isShow_NativeBanner = !1),
                (this.interval_updateBanner = null),
                (this.timeout_checkBannerLoadSucc = null),
                (this.NUM_CheckBannerLoadSucc = 0),
                (this.NUM_MaxCheckBannerLoadSucc = 5),
                (this.NUM_BannerClose = 0),
                (this.videoAd = null),
                (this.loadSucc_Video = !1),
                (this.callback_Video = null),
                (this.timeout_loadVideo = null),
                (this.nativeAd = null),
                (this.customNativeAd = null),
                (this.loadSucc_NativeIcon = !1),
                (this.isShow_NativeIcon = !1),
                (this.isShow_NativeImage = !1),
                (this.loadSucc_NativeImage = !1),
                (this.nativeAdInfo = null),
                (this.firstNativeAdInfo = null),
                (this.customNativeAdInfo = null),
                (this.param_nativeIcon = null),
                (this.param_nativeImage = null),
                (this.timeout_updateNativeIcon = null),
                (this.timeout_updateNativeImage = null),
                (this.node_nativeIcon = null),
                (this.node_nativeImage = null),
                (this.hasReport_NativeAdId = [""]),
                (this.hasReport_CustomNativeAdId = [""]),
                (this.customNativeAdIdArray = [""]),
                (this.nativeOtherRes = null),
                (this.loadSucc_NativeOther = !1),
                (this.nativeBannerRes = null),
                (this.node_nativeBanner = null),
                (this.NUM_hasShowInters = 0),
                (this.NUM_intersNowInterval = 0),
                (this.NUM_IntersNowIntervalTime = 99),
                (this.NUM_IntersNowToAddDesktop = 0),
                (this.navigateBoxBannerAd = null),
                (this.loadSucc_NavigateBoxBanner = !1),
                (this.navigateBoxPortalAd = null),
                (this.loadSucc_NavigateBoxPortal = !1),
                (this.temp_hasShowBanner = !1),
                (this.isShow_NavigateSettle = !1),
                (this.NUM_NowErrVideo = 0),
                (this.NUM_NowGetErrVideoFlag = 0),
                (this.InterErrSwitch = null),
                (this.inter_Err_Num = 0),
                (this.miniGame_version = "101"),
                (this.AdGroup = ""),
                (this.app_test_version = !1);
        }
        return (
            (e.prototype.GameVersion = function (e) {
                this.app_test_version = this.miniGame_version == e;
            }),
            (e.prototype.getGameTestVersion = function () {
                return this.app_test_version;
            }),
            (e.prototype.createAd = function () {
                this.SW_SystemBanner && "" != this.ID_SystemBanner && this.createSystemBanner(),
                    this.SW_Video && "" != this.ID_Video && this.createVideo(),
                    this.SW_Box && "" != this.ID_Box && this.createNavigateBoxPortal(),
                    this.SW_Block && "" != this.ID_Block && this.createNavigateBoxBanner(),
                    this.SW_Native &&
                        "" != this.ID_Native &&
                        (this.createNative(),
                        this.loadNativeOtherRes(),
                        this.SW_NativeBanner && this.loadNativeBannerRes()),
                    this.SW_Native && "" != this.ID_NativeCustom && this.createCustomNative(),
                    qg.setKeepScreenOn({keepScreenOn: !0});
            }),
            (e.prototype.startLoadPushGamaes = function () {}),
            (e.prototype.createSystemBanner = function () {
                var e = this;
                console.log("ChaoQiGameSDK", "--createSystemBanner--"),
                    a.default.stringHasSpace(this.ID_SystemBanner)
                        ? console.log(
                              "ChaoQiGameSDK",
                              "channelId:",
                              a.default.channelId,
                              "当前渠道系统banner广告ID中含有空字符串,请检查后台系统banner广告ID*********************"
                          )
                        : ((this.bannerAd = qg.createBannerAd({adUnitId: this.ID_SystemBanner, style: {}})),
                          (this.loadSucc_SystemBanner = !0),
                          this.bannerAd.onError(function (e) {
                              console.log("ChaoQiGameSDK", "OPPO 系统banner加载/展示失败：", JSON.stringify(e));
                          }),
                          this.bannerAd.onHide(function () {
                              console.log(
                                  "ChaoQiGameSDK",
                                  "OPPO 系统banner关闭",
                                  e.NUM_BannerUpdateTime + "S之后再次刷新"
                              ),
                                  e.NUM_BannerClose++,
                                  e.hideBanner();
                          }));
            }),
            (e.prototype.createVideo = function () {
                var e = this;
                console.log("ChaoQiGameSDK", "--createVideo--"),
                    a.default.stringHasSpace(this.ID_Video)
                        ? console.log(
                              "ChaoQiGameSDK",
                              "channelId:",
                              a.default.channelId,
                              "当前渠道视频广告ID中含有空字符串,请检查后台视频广告ID*********************"
                          )
                        : ((this.videoAd = qg.createRewardedVideoAd({posId: this.ID_Video})),
                          this.videoAd.onLoad(function () {
                              console.log("ChaoQiGameSDK", "OPPO 视频广告加载完成"), (e.loadSucc_Video = !0);
                          }),
                          this.videoAd.onError(function (t) {
                              console.log("ChaoQiGameSDK", "OPPO 视频加载失败：", JSON.stringify(t)),
                                  e.videoAd &&
                                      setTimeout(function () {
                                          e.videoAd && e.videoAd.load();
                                      }, 3e4);
                          }),
                          this.videoAd.onClose(function (t) {
                              t.isEnded
                                  ? (console.log("ChaoQiGameSDK", "OPPO 激励视频广告完成，发放奖励"),
                                    e.callback_Video && (e.callback_Video(!0), e.videoAd.load()))
                                  : (console.log("ChaoQiGameSDK", "OPPO 激励视频广告关闭，不发放奖励"),
                                    e.callback_Video && (e.callback_Video(!1), e.videoAd.load()));
                          }),
                          this.videoAd.load());
            }),
            (e.prototype.createNative = function () {
                var e = this;
                console.log("ChaoQiGameSDK", "--createNative--"),
                    a.default.stringHasSpace(this.ID_Native)
                        ? console.log(
                              "ChaoQiGameSDK",
                              "channelId:",
                              a.default.channelId,
                              "当前渠道原生广告ID中含有空字符串,请检查后台原生广告ID*********************"
                          )
                        : ((this.nativeAd = qg.createNativeAd({posId: this.ID_Native})),
                          (this.nativeAdInfo = {
                              adId: null,
                              title: null,
                              desc: null,
                              Native_icon: null,
                              Native_BigImage: null
                          }),
                          (this.firstNativeAdInfo = {
                              adId: null,
                              title: null,
                              desc: null,
                              Native_icon: null,
                              Native_BigImage: null,
                              NativeClose:
                                  "https://adinfo-1305586391.cos.ap-guangzhou.myqcloud.com/SDK/SDKImage/Native/NativeClose.png",
                              NativeAdTip:
                                  "https://adinfo-1305586391.cos.ap-guangzhou.myqcloud.com/SDK/SDKImage/Native/NativeAdTip.png"
                          }),
                          this.nativeAd.onLoad(function (t) {
                              var o = 0;
                              if (null != typeof t.adList && 0 != t.adList.length) {
                                  if (
                                      ((o = t.adList.length - 1),
                                      console.log(
                                          "ChaoQiGameSDK",
                                          "OPPO 原生广告加载成功：",
                                          JSON.stringify(t.adList[o])
                                      ),
                                      "" != t.adList[o].icon && t.adList[o].imgUrlList.length > 0
                                          ? console.log("ChaoQiGameSDK", "OPPO 原生广告同时存在原生ICON和大图")
                                          : console.log("ChaoQiGameSDK", "OPPO 原生广告只存在原生ICON或大图"),
                                      (e.firstNativeAdInfo.adId = String(t.adList[o].adId)),
                                      (e.firstNativeAdInfo.title = String(t.adList[o].title)),
                                      (e.firstNativeAdInfo.desc = String(t.adList[o].desc)),
                                      (e.nativeAdInfo.adId = String(t.adList[o].adId)),
                                      (e.nativeAdInfo.title = String(t.adList[o].title)),
                                      (e.nativeAdInfo.desc = String(t.adList[o].desc)),
                                      t.adList && "" != t.adList[o].icon)
                                  ) {
                                      var a = function (t) {
                                          console.log("ChaoQiGameSDK", "OPPO 原生ICON加载成功"),
                                              (e.nativeAdInfo.Native_icon = t),
                                              (e.loadSucc_NativeIcon = !0);
                                      };
                                      n.default.loadResCustom(String(t.adList[o].imgUrlList[0]) + "?.png", a),
                                          (e.firstNativeAdInfo.Native_icon = String(t.adList[o].icon));
                                  } else
                                      (e.nativeAdInfo.Native_icon = null),
                                          (e.loadSucc_NativeIcon = !1),
                                          (e.firstNativeAdInfo.Native_icon = null);
                                  t.adList && t.adList[o].imgUrlList.length > 0
                                      ? ((a = function (t) {
                                            console.log("ChaoQiGameSDK", "OPPO 原生ICON加载成功"),
                                                (e.nativeAdInfo.Native_BigImage = t),
                                                (e.loadSucc_NativeIcon = !0);
                                        }),
                                        n.default.loadResCustom(String(t.adList[o].imgUrlList[0]) + "?.png", a),
                                        (e.firstNativeAdInfo.Native_BigImage = String(t.adList[o].imgUrlList[0])))
                                      : ((e.nativeAdInfo.Native_BigImage = null),
                                        (e.loadSucc_NativeImage = !1),
                                        (e.firstNativeAdInfo.Native_BigImage = null));
                              } else console.log("ChaoQiGameSDK", "OPPO 原生广告列表为空 return");
                          }),
                          this.nativeAd.onError(function (e) {
                              console.log("ChaoQiGameSDK", "OPPO 原生广告加载失败：", JSON.stringify(e));
                          }),
                          this.nativeAd.load(),
                          this.nativeAdAutoUpdate());
            }),
            (e.prototype.createCustomNative = function () {
                var e = this;
                console.log("ChaoQiGameSDK", "--createCustomNative--"),
                    a.default.stringHasSpace(this.ID_NativeCustom)
                        ? console.log(
                              "ChaoQiGameSDK",
                              "channelId:",
                              a.default.channelId,
                              "当前渠道自定义原生广告ID中含有空字符串,请检查后台自定义原生广告ID*********************"
                          )
                        : this.ID_Native != this.ID_NativeCustom
                        ? ((this.customNativeAd = qg.createNativeAd({posId: this.ID_NativeCustom})),
                          (this.customNativeAdInfo = {
                              adId: null,
                              title: null,
                              desc: null,
                              Native_icon: null,
                              Native_BigImage: null,
                              NativeClose:
                                  "https://adinfo-1305586391.cos.ap-guangzhou.myqcloud.com/SDK/SDKImage/Native/NativeClose.png",
                              NativeAdTip:
                                  "https://adinfo-1305586391.cos.ap-guangzhou.myqcloud.com/SDK/SDKImage/Native/NativeAdTip.png"
                          }),
                          this.customNativeAd.onLoad(function (t) {
                              var o = t.adList.length - 1;
                              console.log(
                                  "ChaoQiGameSDK",
                                  "OPPO 自定义原生广告加载成功：",
                                  JSON.stringify(t.adList[o])
                              ),
                                  (e.customNativeAdInfo.adId = String(t.adList[o].adId)),
                                  (e.customNativeAdInfo.title = String(t.adList[o].title)),
                                  (e.customNativeAdInfo.desc = String(t.adList[o].desc)),
                                  e.customNativeAdIdArray.unshift(e.customNativeAdInfo.adId),
                                  t.adList && "" != t.adList[o].icon
                                      ? (e.customNativeAdInfo.Native_icon = t.adList[o].icon)
                                      : (e.customNativeAdInfo.Native_icon = null),
                                  t.adList && t.adList[o].imgUrlList.length > 0
                                      ? (e.customNativeAdInfo.Native_BigImage = t.adList[o].imgUrlList[0])
                                      : (e.customNativeAdInfo.Native_BigImage = null);
                          }),
                          this.customNativeAd.onError(function (e) {
                              console.log("ChaoQiGameSDK", "OPPO 自定义原生广告加载失败：", JSON.stringify(e));
                          }),
                          this.customNativeAd.load(),
                          this.customNativeAdAutoUpdate())
                        : console.log(
                              "ChaoQiGameSDK",
                              "channelId:",
                              a.default.channelId,
                              "当前渠道原生广告ID和自定义原生广告ID相同,请检查后台原生与自定义原生广告ID*********************"
                          );
            }),
            (e.prototype.createNavigateBoxBanner = function () {
                console.log("ChaoQiGameSDK", "--createNavigateBoxBanner--"),
                    a.default.stringHasSpace(this.ID_Block)
                        ? console.log(
                              "ChaoQiGameSDK",
                              "channelId:",
                              a.default.channelId,
                              "当前渠道互推盒子横幅广告ID中含有空字符串,请检查后台互推盒子横幅广告ID*********************"
                          )
                        : qg.getSystemInfoSync().platformVersionCode < 1076
                        ? console.log("ChaoQiGameSDK", "OPPO 版本较低,不支持互推盒子广告")
                        : ((this.navigateBoxBannerAd = qg.createGameBannerAd({adUnitId: this.ID_Block})),
                          (this.loadSucc_NavigateBoxBanner = !0),
                          this.navigateBoxBannerAd.onError(function (e) {
                              console.log("ChaoQiGameSDK", "OPPO 互推盒子横幅广告出错:", JSON.stringify(e));
                          }));
            }),
            (e.prototype.createNavigateBoxPortal = function () {
                var e = this;
                console.log("ChaoQiGameSDK", "--createNavigateBoxPortal--"),
                    a.default.stringHasSpace(this.ID_Box)
                        ? console.log(
                              "ChaoQiGameSDK",
                              "channelId:",
                              a.default.channelId,
                              "当前渠道互推盒子九宫格广告ID中含有空字符串,请检查后台互推盒子九宫格广告ID*********************"
                          )
                        : qg.getSystemInfoSync().platformVersionCode < 1076
                        ? console.log("ChaoQiGameSDK", "OPPO 版本较低,不支持互推盒子广告")
                        : ((this.navigateBoxPortalAd = qg.createGamePortalAd({adUnitId: this.ID_Box})),
                          this.navigateBoxPortalAd.onLoad(function () {
                              console.log("ChaoQiGameSDK", "OPPO 互推盒子九宫格广告加载完成"),
                                  (e.loadSucc_NavigateBoxPortal = !0);
                          }),
                          this.navigateBoxPortalAd.onError(function (t) {
                              console.log("ChaoQiGameSDK", "OPPO 互推盒子九宫格广告加载/展示失败：", JSON.stringify(t)),
                                  (e.loadSucc_NavigateBoxPortal = !1),
                                  setTimeout(function () {
                                      e.navigateBoxPortalAd.load();
                                  }, 2e4);
                          }),
                          this.navigateBoxPortalAd.onClose(function () {
                              console.log("ChaoQiGameSDK", "OPPO 互推盒子九宫格广告关闭"),
                                  e.navigateBoxPortalAd.load(),
                                  e.temp_hasShowBanner && e.showBanner();
                          }),
                          this.navigateBoxPortalAd.load());
            }),
            (e.prototype.loadNativeBannerRes = function () {
                var e = this;
                console.log("ChaoQiGameSDK", "--loadNativeBannerRes--"),
                    (this.nativeBannerRes = {
                        NativeBannerBg: null,
                        NativeBannerButton: null,
                        NativeClose: null,
                        NativeAdTip: null
                    }),
                    n.default.loadResArray(
                        [
                            "https://adinfo-1305586391.cos.ap-guangzhou.myqcloud.com/SDK/SDKImage/Native/NativeBannerBg.png",
                            "https://adinfo-1305586391.cos.ap-guangzhou.myqcloud.com/SDK/SDKImage/Native/NativeBannerButton.png",
                            "https://adinfo-1305586391.cos.ap-guangzhou.myqcloud.com/SDK/SDKImage/Native/NativeClose.png",
                            "https://adinfo-1305586391.cos.ap-guangzhou.myqcloud.com/SDK/SDKImage/Native/NativeAdTip.png"
                        ],
                        function (t, o) {
                            (e.nativeBannerRes.NativeBannerBg = o[0]),
                                (e.nativeBannerRes.NativeBannerButton = o[1]),
                                (e.nativeBannerRes.NativeClose = o[2]),
                                (e.nativeBannerRes.NativeAdTip = o[3]),
                                (e.loadSucc_NativeBanner = !0),
                                console.log("ChaoQiGameSDK", "原生banner资源加载成功");
                        }
                    );
            }),
            (e.prototype.loadNativeOtherRes = function () {
                var e = this;
                console.log("ChaoQiGameSDK", "--loadNativeOtherRes--"),
                    (this.nativeOtherRes = {NativeAdTip: null, NativeClose: null}),
                    n.default.loadResArray(
                        [
                            "https://adinfo-1305586391.cos.ap-guangzhou.myqcloud.com/SDK/SDKImage/Native/NativeAdTip.png",
                            "https://adinfo-1305586391.cos.ap-guangzhou.myqcloud.com/SDK/SDKImage/Native/NativeClose.png"
                        ],
                        function (t, o) {
                            (e.nativeOtherRes.NativeAdTip = o[0]),
                                (e.nativeOtherRes.NativeClose = o[1]),
                                (e.loadSucc_NativeOther = !0),
                                console.log("ChaoQiGameSDK", "其他原生资源加载成功");
                        }
                    );
            }),
            (e.prototype.showBanner = function () {
                if (this.loadSucc_Banner)
                    return this.NUM_BannerMostShow <= this.NUM_BannerClose
                        ? (console.log(
                              "ChaoQiGameSDK",
                              "banner最大关闭次数",
                              this.NUM_BannerMostShow,
                              " 已达上限 return"
                          ),
                          void (this.interval_updateBanner && clearInterval(this.interval_updateBanner)))
                        : void (this.isShow_NavigateSettle
                              ? console.log("ChaoQiGameSDK", "OPPO 正在展示互推盒子 return")
                              : this.hasShowBanner
                              ? console.log("ChaoQiGameSDK", "已经调用过showBanner,请勿重复调用")
                              : ((this.hasShowBanner = !0),
                                this.SW_SystemBanner && this.SW_NativeBanner
                                    ? this.SW_SystemBannerFirst
                                        ? (console.log("ChaoQiGameSDK", "系统banner优先"),
                                          this.loadSucc_SystemBanner
                                              ? this.showSystemBanner()
                                              : this.loadSucc_NativeBanner &&
                                                (console.log(
                                                    "ChaoQiGameSDK",
                                                    "系统banner未加载完成,改为展示原生banner"
                                                ),
                                                this.showNativeBanner()))
                                        : (console.log("ChaoQiGameSDK", "原生banner优先"),
                                          this.loadSucc_NativeBanner
                                              ? this.showNativeBanner()
                                              : this.loadSucc_SystemBanner &&
                                                (console.log(
                                                    "ChaoQiGameSDK",
                                                    "原生banner未加载完成,改为展示系统banner"
                                                ),
                                                this.showSystemBanner()))
                                    : this.SW_SystemBanner
                                    ? this.showSystemBanner()
                                    : this.SW_NativeBanner && this.showNativeBanner(),
                                this.updateBanner()));
                this.checkBannerLoadSucc();
            }),
            (e.prototype.hideBanner = function () {
                (this.hasShowBanner = !1),
                    this.hideNativeBanner(),
                    this.hideSystemBanner(),
                    this.interval_updateBanner && clearInterval(this.interval_updateBanner),
                    this.timeout_checkBannerLoadSucc && clearTimeout(this.timeout_checkBannerLoadSucc);
            }),
            (e.prototype.getIntersFlag = function () {
                return (
                    !!(
                        this.SW_AddDesktop &&
                        this.SW_IntersIntervalToAddDesktop &&
                        this.NUM_AutoAddDeskMostTimes > 0 &&
                        this.NUM_IntersToAddDesktopNumber > 0
                    ) || (console.log("ChaoQiGameSDK", "桌面开关未开启或次数未设置"), !1)
                );
            }),
            (e.prototype.showInters = function () {
                var e = this;
                this.NUM_hasShowInters++,
                    this.NUM_hasShowInters == this.NUM_IntersToAddDesktopNumber &&
                    this.NUM_IntersNowToAddDesktop < this.NUM_AutoAddDeskMostTimes
                        ? this.getAddDesktopFlag(function (t) {
                              t &&
                                  (e.NUM_IntersNowToAddDesktop++,
                                  (e.NUM_hasShowInters = 0),
                                  console.log("ChaoQiGameSDK", "插屏变添加桌面"),
                                  e.addDesktop(function () {}));
                          })
                        : console.log(
                              "ChaoQiGameSDK",
                              "插屏变添加桌面次数未达到或自动弹添加桌面次数已达上限或已成功添加桌面"
                          );
            }),
            (e.prototype.getVideoFlag = function () {
                var e = this;
                return (
                    this.loadSucc_Video ||
                        null != this.timeout_loadVideo ||
                        (this.timeout_loadVideo = setTimeout(function () {
                            e.videoAd && e.videoAd.destroy(), e.createVideo(), (e.timeout_loadVideo = null);
                        }, 1e3)),
                    this.loadSucc_Video
                );
            }),
            (e.prototype.showVideo = function (e) {
                (this.callback_Video = e),
                    this.videoAd &&
                        (console.log("ChaoQiGameSDK", "OPPO showVideo==========================="),
                        this.videoAd.show(),
                        (this.loadSucc_Video = !1));
            }),
            (e.prototype.getNativeIconFlag = function () {
                return this.loadSucc_NativeOther && this.loadSucc_NativeIcon;
            }),
            (e.prototype.showNativeIcon = function (e, t, o, n) {
                var a = this;
                if (this.loadSucc_NativeIcon && this.loadSucc_NativeOther) {
                    if (this.isShow_NativeIcon) console.log("ChaoQiGameSDK", "原生icon正在展示中,请勿多次show return");
                    else {
                        (this.isShow_NativeIcon = !0),
                            (this.param_nativeIcon = {width: e, height: t, x: o, y: n}),
                            console.log("ChaoQiGameSDK", "showNativeIcon===========================");
                        var i = this.nativeAdInfo.adId;
                        this.reportNativeAdShow(i);
                        var r = cc.director.getScene();
                        (this.node_nativeIcon = new cc.Node("node_nativeIcon")),
                            r.addChild(this.node_nativeIcon),
                            this.node_nativeIcon.addComponent(cc.Sprite),
                            (this.node_nativeIcon.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                this.nativeAdInfo.Native_icon
                            )),
                            (this.node_nativeIcon.zIndex = 3e4),
                            (this.node_nativeIcon.width = e),
                            (this.node_nativeIcon.height = t),
                            (this.node_nativeIcon.x = o),
                            (this.node_nativeIcon.y = n),
                            "" != this.AdGroup && (this.node_nativeIcon.group = this.AdGroup);
                        var s = new cc.Node("NativeAdTip");
                        this.node_nativeIcon.addChild(s),
                            s.addComponent(cc.Sprite),
                            (s.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                this.nativeOtherRes.NativeAdTip
                            )),
                            (s.width = e / 3),
                            (s.height = (s.width / 70) * 34),
                            (s.x = e / 2 - s.width / 2),
                            (s.y = t / 2 - s.height / 2);
                        var l = new cc.Node("NativeClose");
                        this.node_nativeIcon.addChild(l),
                            l.addComponent(cc.Sprite),
                            (l.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                this.nativeOtherRes.NativeClose
                            )),
                            (l.width = 45),
                            (l.height = 45),
                            (l.x = -this.node_nativeIcon.width / 2 + l.width / 2),
                            (l.y = this.node_nativeIcon.height / 2 - l.width / 2);
                        var c = new cc.Node("titleLabel");
                        this.node_nativeIcon.addChild(c),
                            c.addComponent(cc.Label),
                            cc.winSize.width < cc.winSize.height
                                ? (c.getComponent(cc.Label).fontSize =
                                      (cc.view.getDesignResolutionSize().width / 1080) * 40)
                                : (c.getComponent(cc.Label).fontSize =
                                      (cc.view.getDesignResolutionSize().height / 1080) * 40),
                            (c.getComponent(cc.Label).lineHeight = c.getComponent(cc.Label).fontSize),
                            (c.color = cc.color(255, 255, 255)),
                            this.nativeAdInfo.title.length <= 5
                                ? (c.getComponent(cc.Label).string = this.nativeAdInfo.title)
                                : (c.getComponent(cc.Label).string = ""),
                            (c.y = -t / 2 - 30),
                            l.on(cc.Node.EventType.TOUCH_START, function (e) {
                                console.log("ChaoQiGameSDK", "手动关闭原生ICON"),
                                    a.node_nativeIcon.removeFromParent(),
                                    (a.node_nativeIcon = null),
                                    e.stopPropagation();
                            }),
                            this.node_nativeIcon.on(cc.Node.EventType.TOUCH_START, function () {
                                console.log("ChaoQiGameSDK", "点击原生ICON"), a.reportNativeAdClick(i);
                            }),
                            (this.timeout_updateNativeIcon = setTimeout(function () {
                                console.log("ChaoQiGameSDK", "原生icon刷新"),
                                    a.hideNativeIcon(),
                                    a.showNativeIcon(
                                        a.param_nativeIcon.width,
                                        a.param_nativeIcon.height,
                                        a.param_nativeIcon.x,
                                        a.param_nativeIcon.y
                                    );
                            }, 1e3 * this.NUM_NativeUpdateTime));
                    }
                } else console.log("ChaoQiGameSDK", "原生icon或资源未加载成功 return");
            }),
            (e.prototype.hideNativeIcon = function () {
                this.isShow_NativeIcon &&
                    (console.log("ChaoQiGameSDK", "hideNativeIcon==========================="),
                    (this.isShow_NativeIcon = !1),
                    this.timeout_updateNativeIcon && clearTimeout(this.timeout_updateNativeIcon),
                    this.node_nativeIcon && (this.node_nativeIcon.removeFromParent(), (this.node_nativeIcon = null)));
            }),
            (e.prototype.getNativeImageFlag = function () {
                return this.loadSucc_NativeOther && this.loadSucc_NativeImage;
            }),
            (e.prototype.showNativeImage = function (e, t, o, n) {
                var a = this;
                if (this.loadSucc_NativeImage && this.loadSucc_NativeOther) {
                    if (this.isShow_NativeImage) console.log("ChaoQiGameSDK", "原生大图正在展示中,请勿多次show");
                    else {
                        (this.isShow_NativeImage = !0),
                            (this.param_nativeImage = {width: e, height: t, x: o, y: n}),
                            console.log("ChaoQiGameSDK", "OPPO showNativeImage===========================");
                        var i = this.nativeAdInfo.adId;
                        this.reportNativeAdShow(i);
                        var r = cc.director.getScene();
                        (this.node_nativeImage = new cc.Node("node_nativeImage")),
                            r.addChild(this.node_nativeImage),
                            this.node_nativeImage.addComponent(cc.Sprite),
                            (this.node_nativeImage.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                this.nativeAdInfo.Native_BigImage
                            )),
                            (this.node_nativeImage.zIndex = 3e4),
                            (this.node_nativeImage.width = e),
                            (this.node_nativeImage.height = t),
                            (this.node_nativeImage.x = o),
                            (this.node_nativeImage.y = n),
                            "" != this.AdGroup && (this.node_nativeImage.group = this.AdGroup);
                        var s = new cc.Node("NativeAdTip");
                        this.node_nativeImage.addChild(s),
                            s.addComponent(cc.Sprite),
                            (s.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                this.nativeOtherRes.NativeAdTip
                            )),
                            s.addComponent(cc.Widget),
                            (s.getComponent(cc.Widget).isAlignLeft = !0),
                            (s.getComponent(cc.Widget).isAlignTop = !0),
                            (s.getComponent(cc.Widget).left = 0),
                            (s.getComponent(cc.Widget).top = 0),
                            (s.width = e / 5),
                            (s.height = (s.width / 70) * 34);
                        var l = new cc.Node("NativeClose");
                        this.node_nativeImage.addChild(l),
                            l.addComponent(cc.Sprite),
                            (l.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                this.nativeOtherRes.NativeClose
                            )),
                            l.addComponent(cc.Widget),
                            (l.getComponent(cc.Widget).isAlignRight = !0),
                            (l.getComponent(cc.Widget).isAlignTop = !0),
                            (l.getComponent(cc.Widget).right = 0),
                            (l.getComponent(cc.Widget).top = 0),
                            (l.width = 45),
                            (l.height = 45),
                            l.on(cc.Node.EventType.TOUCH_START, function (e) {
                                console.log("ChaoQiGameSDK", "手动关闭原生大图"),
                                    a.hideNativeImage(),
                                    e.stopPropagation();
                            }),
                            this.node_nativeImage.on(cc.Node.EventType.TOUCH_START, function () {
                                console.log("ChaoQiGameSDK", "点击原生大图"), a.reportNativeAdClick(i);
                            });
                    }
                } else console.log("ChaoQiGameSDK", "原生大图或资源未加载成功 return");
            }),
            (e.prototype.hideNativeImage = function () {
                (this.isShow_NativeImage = !1),
                    this.node_nativeImage && (this.node_nativeImage.removeFromParent(), (this.node_nativeImage = null));
            }),
            (e.prototype.getNativeAdFlag = function (e) {
                return 1 == e ? this.SW_BigNative : this.SW_IconNative;
            }),
            (e.prototype.getNativeAdInfo = function (e) {
                return 1 == e
                    ? (console.log("ChaoQiGameSDK", "获取原生广告"), this.firstNativeAdInfo)
                    : (console.log("ChaoQiGameSDK", "获取自定义原生广告"), this.customNativeAdInfo);
            }),
            (e.prototype.reportNativeAdShow = function (e) {
                if (-1 != this.customNativeAdIdArray.indexOf(e)) {
                    if (
                        (console.log(
                            "ChaoQiGameSDK",
                            "OPPO 该自定义原生广告id是否已上报展示?",
                            -1 != this.hasReport_CustomNativeAdId.indexOf(e)
                        ),
                        -1 != this.hasReport_CustomNativeAdId.indexOf(e))
                    )
                        return;
                    console.log("ChaoQiGameSDK", "OPPO 自定义原生广告上报展示", e),
                        this.hasReport_CustomNativeAdId.unshift(e),
                        this.customNativeAd.reportAdShow({adId: e});
                } else {
                    if (
                        (console.log(
                            "ChaoQiGameSDK",
                            "OPPO 该原生广告id是否已上报展示?",
                            -1 != this.hasReport_NativeAdId.indexOf(e)
                        ),
                        -1 != this.hasReport_NativeAdId.indexOf(e))
                    )
                        return;
                    console.log("ChaoQiGameSDK", "OPPO 原生广告上报展示", e),
                        this.hasReport_NativeAdId.unshift(e),
                        this.nativeAd.reportAdShow({adId: e});
                }
            }),
            (e.prototype.reportNativeAdClick = function (e) {
                -1 != this.customNativeAdIdArray.indexOf(e)
                    ? (console.log("ChaoQiGameSDK", "OPPO 自定义原生广告上报点击", e),
                      this.customNativeAd.reportAdClick({adId: e}))
                    : (console.log("ChaoQiGameSDK", "OPPO 原生广告上报点击", e),
                      this.nativeAd.reportAdClick({adId: e}));
            }),
            (e.prototype.getNavigateIconFlag = function () {
                return !1;
            }),
            (e.prototype.showNavigateIcon = function () {}),
            (e.prototype.hideNavigateIcon = function () {}),
            (e.prototype.getNavigateGroupFlag = function () {
                return !1;
            }),
            (e.prototype.showNavigateGroup = function () {}),
            (e.prototype.hideNavigateGroup = function () {}),
            (e.prototype.getNavigateSettleFlag = function () {
                return !1;
            }),
            (e.prototype.showNavigateSettle = function () {}),
            (e.prototype.hideNavigateSettle = function () {}),
            (e.prototype.getNavigateBoxBannerFlag = function () {
                return this.loadSucc_NavigateBoxBanner;
            }),
            (e.prototype.showNavigateBoxBanner = function () {
                this.isShow_NavigateSettle
                    ? console.log("ChaoQiGameSDK", "已经调用过showNavigateBoxBanner,请勿重复调用")
                    : ((this.isShow_NavigateSettle = !0),
                      this.loadSucc_NavigateBoxBanner &&
                          (this.hideBanner(),
                          console.log("ChaoQiGameSDK", "showNavigateBoxBanner====================="),
                          this.navigateBoxBannerAd.show()));
            }),
            (e.prototype.hideNavigateBoxBanner = function () {
                this.isShow_NavigateSettle &&
                    (console.log("ChaoQiGameSDK", "hideNavigateBoxBanner====================="),
                    (this.isShow_NavigateSettle = !1),
                    this.navigateBoxBannerAd && this.navigateBoxBannerAd.hide());
            }),
            (e.prototype.getNavigateBoxPortalFlag = function () {
                return this.loadSucc_NavigateBoxPortal;
            }),
            (e.prototype.showNavigateBoxPortal = function () {
                this.loadSucc_NavigateBoxPortal &&
                    ((this.temp_hasShowBanner = this.hasShowBanner),
                    this.hideBanner(),
                    this.navigateBoxPortalAd.show());
            }),
            (e.prototype.setGroup = function (e) {
                this.AdGroup = e;
            }),
            (e.prototype.hasAddDesktopFunc = function () {
                return !0;
            }),
            (e.prototype.getAddDesktopFlag = function (e) {
                qg.hasShortcutInstalled({
                    success: function (t) {
                        0 == t
                            ? (console.log("ChaoQiGameSDK", "OPPO 不存在桌面图标"), e(!0))
                            : (console.log("ChaoQiGameSDK", "OPPO 已存在桌面图标"), e(!1));
                    },
                    fail: function (t) {
                        console.log("ChaoQiGameSDK", "OPPO qg.hasShortcutInstalled err：", JSON.stringify(t)), e(!1);
                    },
                    complete: function () {}
                });
            }),
            (e.prototype.addDesktop = function (e) {
                qg.installShortcut({
                    success: function () {
                        console.log("ChaoQiGameSDK", "OPPO 添加桌面成功"), e(!0);
                    },
                    fail: function (t) {
                        console.log("ChaoQiGameSDK", "OPPO 添加桌面失败:" + JSON.stringify(t)), e(!1);
                    },
                    complete: function () {}
                });
            }),
            (e.prototype.phoneVibrate = function (e) {
                "short" == e
                    ? qg.vibrateShort({success: function () {}, fail: function () {}, complete: function () {}})
                    : "long" == e &&
                      qg.vibrateLong({success: function () {}, fail: function () {}, complete: function () {}});
            }),
            (e.prototype.startGameVideo = function () {}),
            (e.prototype.pauseGameVideo = function () {}),
            (e.prototype.resumeGameVideo = function () {}),
            (e.prototype.stopGameVideo = function () {}),
            (e.prototype.shareVideo = function () {}),
            (e.prototype.jumpToMoreGamesCenter = function () {}),
            (e.prototype.showMoreGamesBanner = function () {}),
            (e.prototype.hideMoreGamesBanner = function () {}),
            (e.prototype.showFavoriteGuide = function () {}),
            (e.prototype.getBoxFlag = function () {
                return !1;
            }),
            (e.prototype.showAppBox = function () {}),
            (e.prototype.getBlockFlag = function () {
                return !1;
            }),
            (e.prototype.showBlock = function () {}),
            (e.prototype.hideBlock = function () {}),
            (e.prototype.getVideoIntersFlag = function () {
                return !1;
            }),
            (e.prototype.showVideoInters = function () {}),
            (e.prototype.exitTheGame = function () {}),
            (e.prototype.reportAnalytics = function () {}),
            (e.prototype.showAuthentication = function () {}),
            (e.prototype.visitorExperience = function () {}),
            (e.prototype.showNativeAd = function () {}),
            (e.prototype.getOPPOShowMoreGameFlag = function () {}),
            (e.prototype.showOPPOMoreGame = function () {}),
            (e.prototype.hasNetwork = function () {}),
            (e.prototype.showReviewAlert = function () {}),
            (e.prototype.showiOSADWithScene = function () {}),
            (e.prototype.showiOSADWithType = function () {}),
            (e.prototype.videoUIShow = function () {}),
            (e.prototype.showPrivacyAgreement = function () {}),
            (e.prototype.getErrBannerFlag = function () {
                return !1;
            }),
            (e.prototype.showErrBanner = function (e) {
                e(!1);
            }),
            (e.prototype.hideErrBanner = function () {}),
            (e.prototype.getErrVideoFlag = function () {
                return (
                    this.NUM_NowGetErrVideoFlag++,
                    this.NUM_NowGetErrVideoFlag == this.NUM_VideoErrMust
                        ? (console.log("ChaoQiGameSDK", "v 第" + this.NUM_VideoErrMust + "次出现"), !0)
                        : this.NUM_NowErrVideo >= this.NUM_VideoErrMost
                        ? (console.log("ChaoQiGameSDK", "已达上限 v"), !1)
                        : this.getVideoFlag()
                        ? this.NUM_VideoErrP > 0 &&
                          (console.log("ChaoQiGameSDK", "Pv", this.NUM_VideoErrP),
                          Math.floor(100 * Math.random()) < this.NUM_VideoErrP && (this.NUM_NowErrVideo++, !0))
                        : (console.log("ChaoQiGameSDK", "OPPO 视频广告未加载完成"), !1)
                );
            }),
            (e.prototype.buyProps = function (e, t, o, n) {
                n(!1, "");
            }),
            (e.prototype.payComplete = function () {}),
            (e.prototype.checkBannerLoadSucc = function () {
                var e = this;
                if (
                    ((this.loadSucc_Banner =
                        (this.loadSucc_NativeBanner && (this.loadSucc_NativeIcon || this.loadSucc_NativeImage)) ||
                        this.loadSucc_SystemBanner),
                    console.log(
                        "ChaoQiGameSDK",
                        "banner加载成功?",
                        this.loadSucc_Banner,
                        ++this.NUM_CheckBannerLoadSucc
                    ),
                    this.timeout_checkBannerLoadSucc && clearTimeout(this.timeout_checkBannerLoadSucc),
                    this.loadSucc_Banner)
                )
                    this.showBanner();
                else {
                    if (this.NUM_CheckBannerLoadSucc >= this.NUM_MaxCheckBannerLoadSucc) return;
                    this.timeout_checkBannerLoadSucc = setTimeout(function () {
                        e.checkBannerLoadSucc();
                    }, 5e3);
                }
            }),
            (e.prototype.showNativeBanner = function () {
                var e = this;
                if (this.isShow_NavigateSettle) console.log("ChaoQiGameSDK", "OPPO 正在展示互推盒子 return");
                else {
                    this.isShow_NativeBanner = !0;
                    var t = cc.director.getScene(),
                        o = this.nativeAdInfo.adId;
                    this.reportNativeAdShow(o),
                        console.log("ChaoQiGameSDK", "showNativeBanner========================"),
                        (this.node_nativeBanner = new cc.Node("node_nativeBanner")),
                        t.addChild(this.node_nativeBanner),
                        this.node_nativeBanner.addComponent(cc.Sprite),
                        (this.node_nativeBanner.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                            this.nativeBannerRes.NativeBannerBg
                        )),
                        this.node_nativeBanner.addComponent(cc.Widget),
                        (this.node_nativeBanner.getComponent(cc.Widget).isAlignHorizontalCenter = !0),
                        (this.node_nativeBanner.getComponent(cc.Widget).isAlignBottom = !0),
                        (this.node_nativeBanner.getComponent(cc.Widget).bottom = 0),
                        cc.winSize.width < cc.winSize.height
                            ? ((this.node_nativeBanner.width = cc.winSize.width),
                              (this.node_nativeBanner.height = 0.18 * cc.winSize.width))
                            : ((this.node_nativeBanner.width = cc.winSize.width / 0.18),
                              (this.node_nativeBanner.height = 0.2 * this.node_nativeBanner.width)),
                        "" != this.AdGroup && (this.node_nativeBanner.group = this.AdGroup),
                        (this.node_nativeBanner.zIndex = 29999),
                        this.node_nativeBanner.on(cc.Node.EventType.TOUCH_START, function () {
                            e.reportNativeAdClick(o);
                        });
                    var n = new cc.Node("adTip");
                    this.node_nativeBanner.addChild(n),
                        n.addComponent(cc.Sprite),
                        (n.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(this.nativeBannerRes.NativeAdTip)),
                        (n.height = 0.2 * this.node_nativeBanner.height),
                        (n.width = n.height / 0.45),
                        (n.x = this.node_nativeBanner.width / 2 - n.width / 2),
                        (n.y = this.node_nativeBanner.height / 2 - n.height / 2);
                    var a = new cc.Node("bannerButton");
                    if (
                        (this.node_nativeBanner.addChild(a),
                        a.addComponent(cc.Sprite),
                        (a.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                            this.nativeBannerRes.NativeBannerButton
                        )),
                        (a.width = 0.255 * this.node_nativeBanner.width),
                        (a.height = 0.351 * a.width),
                        (a.x = this.node_nativeBanner.width / 2 - 0.185 * this.node_nativeBanner.width),
                        (a.y = 0),
                        this.loadSucc_NativeImage)
                    ) {
                        var i = new cc.Node("image");
                        this.node_nativeBanner.addChild(i),
                            i.addComponent(cc.Sprite),
                            (i.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                this.nativeAdInfo.Native_BigImage
                            )),
                            (i.height = this.node_nativeBanner.height),
                            (i.width = 2 * i.height),
                            (i.x = i.width / 2 - this.node_nativeBanner.width / 2),
                            (i.y = 0);
                    } else if (this.loadSucc_NativeIcon) {
                        var r = new cc.Node("icon");
                        this.node_nativeBanner.addChild(r),
                            r.addComponent(cc.Sprite),
                            (r.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                this.nativeAdInfo.Native_BigImage
                            )),
                            (r.height = 0.8 * this.node_nativeBanner.height),
                            (r.width = r.height),
                            (r.x = 0.8 * r.width - this.node_nativeBanner.width / 2),
                            (r.y = 0);
                    }
                    var s = new cc.Node("titleLabel");
                    this.node_nativeBanner.addChild(s),
                        s.addComponent(cc.Label),
                        cc.winSize.width < cc.winSize.height
                            ? (s.getComponent(cc.Label).fontSize =
                                  (cc.view.getDesignResolutionSize().width / 1080) * 35)
                            : (s.getComponent(cc.Label).fontSize =
                                  (cc.view.getDesignResolutionSize().height / 1080) * 35),
                        "" == this.nativeAdInfo.desc
                            ? (s.getComponent(cc.Label).string = this.nativeAdInfo.title)
                            : (s.getComponent(cc.Label).string = this.nativeAdInfo.desc),
                        (s.getComponent(cc.Label).overflow = cc.Label.Overflow.CLAMP),
                        (s.getComponent(cc.Label).horizontalAlign = cc.Label.HorizontalAlign.LEFT),
                        (s.getComponent(cc.Label).verticalAlign = cc.Label.VerticalAlign.CENTER),
                        (s.getComponent(cc.Label).lineHeight = s.getComponent(cc.Label).fontSize),
                        (s.color = cc.color(255, 0, 0)),
                        (s.width =
                            this.node_nativeBanner.width -
                            2 * this.node_nativeBanner.height -
                            a.width -
                            (0.2 * this.node_nativeBanner.height) / 0.45),
                        (s.height = this.node_nativeBanner.height),
                        (s.y = 0),
                        (s.x = -this.node_nativeBanner.width / 2 + 2.1 * this.node_nativeBanner.height + s.width / 2);
                    var l = new cc.Node("closeICON");
                    this.node_nativeBanner.addChild(l),
                        l.addComponent(cc.Sprite),
                        (l.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(this.nativeBannerRes.NativeClose)),
                        (l.width = 0.27 * this.node_nativeBanner.height),
                        (l.height = 0.27 * this.node_nativeBanner.height),
                        (l.x = -this.node_nativeBanner.width / 2 + l.width / 2),
                        (l.y = this.node_nativeBanner.height / 2 - l.width / 2);
                    var c = new cc.Node("closeButton");
                    this.node_nativeBanner.addChild(c),
                        (c.width = l.height),
                        (c.height = l.height),
                        (c.x = -this.node_nativeBanner.width / 2 + l.width / 2),
                        (c.y = this.node_nativeBanner.height / 2 - l.width / 2),
                        (c.zIndex = 29999),
                        c.on(cc.Node.EventType.TOUCH_START, function (t) {
                            e.getNativeCloseErr()
                                ? e.reportNativeAdClick(o)
                                : (console.log(
                                      "ChaoQiGameSDK",
                                      "原生banner关闭",
                                      e.NUM_BannerUpdateTime + "S后再次刷新"
                                  ),
                                  e.hideNativeBanner(),
                                  e.NUM_BannerClose++,
                                  e.hideBanner(),
                                  t.stopPropagation());
                        });
                }
            }),
            (e.prototype.showSystemBanner = function () {
                this.isShow_NavigateSettle
                    ? console.log("ChaoQiGameSDK", "OPPO 正在展示互推盒子 return")
                    : (console.log("ChaoQiGameSDK", "OPPO showSystemBanner========================"),
                      (this.isShow_SystemBanner = !0),
                      this.bannerAd.show());
            }),
            (e.prototype.updateBanner = function () {
                var e = this;
                if (this.NUM_BannerMostShow <= this.NUM_BannerClose)
                    return (
                        console.log(
                            "ChaoQiGameSDK",
                            "banner最大关闭(最多展示)次数",
                            this.NUM_BannerMostShow,
                            " 已达上限 return"
                        ),
                        void (this.interval_updateBanner && clearInterval(this.interval_updateBanner))
                    );
                this.interval_updateBanner && clearInterval(this.interval_updateBanner),
                    (this.interval_updateBanner = setInterval(function () {
                        if (e.NUM_BannerMostShow <= e.NUM_BannerClose)
                            return (
                                console.log(
                                    "ChaoQiGameSDK",
                                    "banner最大关闭(最多展示)次数",
                                    e.NUM_BannerMostShow,
                                    " 已达上限 return"
                                ),
                                void (e.interval_updateBanner && clearInterval(e.interval_updateBanner))
                            );
                        e.SW_SystemBanner && e.SW_NativeBanner
                            ? e.SW_SystemBannerFirst
                                ? (console.log("ChaoQiGameSDK", "系统banner优先"),
                                  e.loadSucc_SystemBanner
                                      ? (console.log("ChaoQiGameSDK", "刷新系统banner"), e.updateSystemBanner())
                                      : e.loadSucc_NativeBanner &&
                                        (console.log("ChaoQiGameSDK", "系统banner未加载完成,改为刷新原生banner"),
                                        e.updateNativeBanner()))
                                : (console.log("ChaoQiGameSDK", "原生banner优先"),
                                  e.loadSucc_NativeBanner
                                      ? (console.log("ChaoQiGameSDK", "刷新原生banner"), e.updateNativeBanner())
                                      : e.loadSucc_SystemBanner &&
                                        (console.log("ChaoQiGameSDK", "原生banner未加载完成,改为刷新系统banner"),
                                        e.updateSystemBanner()))
                            : e.SW_SystemBanner
                            ? e.updateSystemBanner()
                            : e.SW_NativeBanner && e.updateNativeBanner();
                    }, 1e3 * this.NUM_BannerUpdateTime));
            }),
            (e.prototype.updateSystemBanner = function () {
                console.log("ChaoQiGameSDK", "OPPO updateSystemBanner========================"),
                    this.hideNativeBanner(),
                    this.hideSystemBanner(),
                    this.showSystemBanner();
            }),
            (e.prototype.hideSystemBanner = function () {
                this.isShow_SystemBanner &&
                    this.bannerAd &&
                    (console.log("ChaoQiGameSDK", "OPPO hideSystemBanner========================"),
                    (this.isShow_SystemBanner = !1),
                    this.bannerAd.offHide(),
                    this.bannerAd.hide());
            }),
            (e.prototype.updateNativeBanner = function () {
                console.log("ChaoQiGameSDK", "OPPO updateNativeBanner========================"),
                    this.hideNativeBanner(),
                    this.hideSystemBanner(),
                    this.showNativeBanner();
            }),
            (e.prototype.hideNativeBanner = function () {
                this.isShow_NativeBanner &&
                    (console.log("ChaoQiGameSDK", "OPPO hideNativeBanner========================"),
                    (this.isShow_NativeBanner = !1),
                    this.node_nativeBanner.removeFromParent(),
                    (this.node_nativeBanner = null));
            }),
            (e.prototype.getNativeCloseErr = function () {
                var e = !1;
                return (
                    this.inter_Err_Num++,
                    null != this.InterErrSwitch &&
                        this.InterErrSwitch.inter_switch &&
                        (0 != this.InterErrSwitch.trigger_number
                            ? this.inter_Err_Num >= this.InterErrSwitch.trigger_number &&
                              ((e = !0), (this.inter_Err_Num = 0))
                            : this.InterErrSwitch.trigger_prob > 0
                            ? Math.floor(100 * Math.random()) < this.InterErrSwitch.trigger_prob && (e = !0)
                            : 0 == this.InterErrSwitch.trigger_number &&
                              0 == this.InterErrSwitch.trigger_prob &&
                              (e = !0)),
                    e
                );
            }),
            (e.prototype.nativeAdAutoUpdate = function () {
                var e = this;
                setInterval(function () {
                    e.nativeAd && e.nativeAd.load();
                }, 1e3 * this.NUM_NativeUpdateTime);
            }),
            (e.prototype.customNativeAdAutoUpdate = function () {
                var e = this;
                setInterval(function () {
                    e.customNativeAd && e.customNativeAd.load();
                }, 1e3 * this.NUM_NativeUpdateTime);
            }),
            e
        );
    })();
o.default = i;
